﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>Overview</title>
	</head>
	<body>
<h2>Overview</h2>
MercuryFE is made up of three distinct components 
<ul>
	<li>Configuration - this is used to enter and maintain all data relating to menus, games, etc used by the frontend.</li>
	<li>ControlPanelEditor - this is used to define the layout of your control panel, and assign keys and labels to all the objects.</li>
	<li>FrontEnd - this is the interface used to launch games, and look at information relating to the games</li>
</ul>	
The reason for the break up is so that any number of different interfaces / clients can be created to utilise the underlying database, which has been set up
using the configuration tools.

<h2>Architecture</h2>
At the heart of this frontend is a SQL Compact Edition database.(SQL CE) (.Net 3.5). The configuration tool populates this database with all your
settings, games, menu's, etc.<br />
All three components read and write directly from this database. To ensure all settings and menus are preserved, this database must be backed up.

<h2>Why?</h2>
There are so many game launchers out there. Why a new one?<br />
I've been meaning to sit down and learn LINQ properly, as well as explore what SQL CE was like. A perfect opportunity to test and expand my knowledge, as
well as have a bit of fun. Maybe people out there can even use the underlying database and configuration tool, and focus purely on creating a really nice
Frontend - or then again, dismiss it altogether.<br />
I've tried to make the tool as 'emulator independant' as possible. Currently, all the imports are specific to MAME, which allow a lot of advanced functionality.
One side affect of this is that menus can contain games from all kinds of emulators :- you can create a favourites menu which does truly contain all your 
favourites regardless of origin.<br />
Finally, ease of use. I wanted to incorporate all functionality that I deemed useful, into the one tool. With all the underlying files in hand, I wanted to 
create something you could configure, then play. Coming into the scene, I had to interact with a lot of tools just to get the configuration to where I wanted it.<br />
As a short example;<br />
<ul>
<li>Use Romlister to generate the menus for your desired frontend. MAME support files (controls, command, etc), need to be loaded for this.</li>
<li>Provide the same MAME support files for the frontend or another third party tool (if your lucky enough that it supports it).</li>
</ul>

<h2>Configuration Tool</h2>
First time you fire up the configuration tool, an empty database will be created (LauncherDB.sdf). If things ever go really bad, you can just delete this
file and next time you start the configuration tool, a new empty database will be created again.<br />
Main thing to understand is nothing will be present in the tables (and in turn the client interface) until you explicitly load all the required data in through
the configuration tool.<br />
Initial set up<br />
<ul>
	<li>Parameters - Set up any parameters according to your system.</li>
	<li>Emulators - Configure all your emulators, ensuring the paths have been correctly specified.</li>
	<li>Data Load - With mame files in hand, load them all into the database. You may also utilise the download assitant to grab these files.</li>
	<li>Games - Import all the games found on the file system (configured in emulators), as well as add any custom game entries.</li>
	<li>Music - very early stages. All this allows you to do is scan for music and add to database.
	<li>Menus - Assuming all your games are present, start setting up your menus exactly how you want. Another interface will launch, allowing you to fine tune
		your search for specific games.</li>
	<li>Utils - Various functions to run on the database and roms.</li>
	<li>DB Maintenance - Allows you to recreate database, or remap drive letters for emulator paths (if you are moving to another drive)</li>
</ul>

	
<h3>Parameters</h3>
Simple configuration items used for both configuration and by the client. All parameters have a description viewable in the standard property grid for further 
information. Don't forget to save changes back to the database.
<h3>Emulators</h3>
Here is where you add and remove emulators on your system. All the paths configured here are used when scanning for files on the file system, and allow 
you to launch games, view their snapshots and so on. Currently, I only have ROM, MOVIE and SNAP paths set up, but you can specify as many paths as you want, as
well as allowing recursion into sub paths. This allows you to have whatever kind of folder structure you desire to store your files in; store files in 
sub folders based on first letter of rom name, based on category, based on version, etc.
<h3>Data Load</h3>
Here is where external information is loaded into the database.<br />
Mame files, as the name suggests, are specific to Mame. These files only need to be loaded as updates occurr.<br />
Depending on the speed of your system, the load for all these files, especially the controls file, will take a few minutes. Be patient, it is worth it.<br />
NOTE: Once the files have been loaded in, you will not require these to be on the file system any more.
<h3>Games</h3>
Scan for games, will actually scan the file system, match up roms with their corresponding movies and snapshots, and update the database. Note that the 
emulators have to be correctly configured for this functionality to work. That is, if the paths are pointing at the right locations, the tool doesn't know where
to look.<br />
This also allows you to add custom game entries, such as if you wanted to launch Street Fighter 4 on the PC.

<h3>Menus</h3>
As the name says. This allows you to define the menu hierarchy (no limit on depth). Right clicking on actual menu entries will show a context menu with additional functionality.<br />
To add new games, click add, which will launch an interface allowing you to search your game collection.
<h4>Search Games interface</h4>
Similar interface to RomLister, with the added functionality of using manufacturers and bios files.


<h2>Control Panel Editor</h2>
This tool relies on the underlying database to already exist. It reads information about what emulators and MAME roms are present, as well as writing back the 
final configuration. Extremely basic for the first version, and will require an overhaul in the future.<br />
Two main concepts need to be understood to use this tool.
<ul>
	<li>Layout - This is the physical layout of the control panel, and currently, only one is supported.  It specifies the location of joysticks, buttons, etc. The layout also
	stores the physical 'inputs' behind each item, such as the 'X' for a button, or mouse button 1 for a button. In fact, the layout cannot be saved until
	the physical inputs have been assigned to each item.</li>
	<li>Assignment - Numerous assigments can be attached to a layout - each one is either attached to a specific emulator/ custom game, or in the case of MAME,
	can be attached at numerous 'levels'. (These 'levels' mimic the MAME custom control configuration - top level, driver level and finally rom level. Utilising this
	hierarchy allows this tool to write a custom control configuration file that can be utilised by MAME.) <br />
	An assignment essentially determines which labels to display alongside control items. For MAME, these are derived from the Controls file, whereas for other
	emulators, these are custom labels that the user needs to insert.</li>
</ul>

<h2>Frontend</h2>
This is the part that the user interacts with and sees. I'm no interface specialist, but I've created something that works for me. Main things I've tried to incorporate into
this interface is;
<ul>
	<li>Handling of numerous input devices (using direct input) - all these are configured using the configuration program.</li>
	<li>Process handling and clean launching of emulators. MAME includes interop functionality to detect pauses, and display detailed game information.</li>
	<li>Basic music support. Entire albums can be added to the queue, which will play in the background while games are selected</li>
</ul>
	
<h2>Credits</h2>
Just a quick mention of some brilliant .net components I've used (some with a little tweaking).<br />
<a href="http://www.codeproject.com/KB/vb/PropertyGridEx.aspx" target="_blank">Property Grid Ex</a> written by Danilo Corallo.<br />
<a href="http://inputsimulator.codeplex.com/" target="_blank">Input Simulator</a> written by Michael Noonan.<br />
<a href="http://htmlagilitypack.codeplex.com/" target="_blank"> HTML Agility Pack</a> written by DarthObiwan<br />
<a href="http://sharpdevelop.net/OpenSource/SharpZipLib/" target="_blank">SharpZipLib</a><br />
<a href="http://dragonking.arcadecontrols.com/static.php?page=aboutInterOp" target="_blank">MAME interop</a> written by MAME team, Howard Casto and Headkaze <br />
<a href="http://download.banshee.fm/taglib-sharp/"  target="_blank">Taglib Sharp</a> originally written by Novell????<br />
<br /><br />
	</body>
</html>